import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/home/home.vue')
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/about/about.vue')
  },
  {
    path: '/work',
    name: 'work',
    component: () => import('../views/work/work.vue')
  },
  {
    path: '/huangye',
    name: 'huangye',
    component: () => import('../views/huangye/huangye.vue')
  },
  {
    path: '/huangyeSel',
    name: 'huangyeSel',
    component: () => import('../views/huangye/huangyeSel.vue')
  },
  {
    path: '/qiuzhi',
    name: 'qiuzhi',
    component: () => import('../views/qiuzhi/qiuzhi.vue')
  },
  {
    path: '/yingyong',
    name: 'yingyong',
    component: () => import('../views/yingyong/yingyong.vue')
  },
  {
    path: '/huiyuan',
    name: 'huiyuan',
    component: () => import('../views/huiyuan/huiyuan.vue')
  },
  {
    path: '/detail',
    name: 'detail',
    component: () => import('../views/detail/detail.vue')
  },
  {
    path: '/xinwen',
    name: 'xinwen',
    component: () => import('../views/xinwen/xinwen.vue')
  },
  {
    path: '/xinwenNav',
    name: 'xinwenNav',
    component: () => import('../views/xinwen/xinwenNav.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/login.vue')
  },
  {
    path: '/loginIn',
    name: 'loginIn',
    component: () => import('../views/login/loginIn.vue')
  },
  {
    path: '/hezuo',
    name: 'hezuo',
    component: () => import('../views/hezuo/hezuo.vue')
  },
  {
    path: '/hezuoGr',
    name: 'hezuoGr',
    component: () => import('../views/hezuo/hezuoGr.vue')
  },
  {
    path: '/phone',
    name: 'phone',
    component: () => import('../views/about/aboutTel.vue')
  }
  
  
]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})
const originalPush = VueRouter.prototype.push;
//修改原型对象中的push方法
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
export default router
